#!/usr/bin/env python
# coding: utf-8

# In[1]:


import tushare as ts
import pandas as pd
import talib
# 导入tushare
import tushare as ts
# 初始化pro接口
pro = ts.pro_api('b28260c3345a7e18e1399cc5d678829c7cb86335816f1552b49a08c0')
# 拉取数据
df = pro.daily(**{
    "ts_code": "",
    "trade_date": "",
    "start_date": 20250301,
    "end_date": 20250315,
    "offset": "",
    "limit": ""
}, fields=[
    "ts_code",
    "trade_date",
    "open",
    "high",
    "low",
    "close",
    "pre_close",
    "change",
    "pct_chg",
    "vol",
    "amount"
])
# 数据统计表
statistics = df.describe()
print("数据统计表:")
print(statistics)
# 对数据进行排序
df = df.sort_values(by=['ts_code', 'trade_date'])


# In[ ]:




